/*
 * Copyright (C) 2017 yixun All Rights Reserved.
 * 
 * Department.java
 */
package com.yixun.qfbao.model;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.springframework.util.CollectionUtils;

/**
 * [文件名称]<br>
 * Department.java<br>
 * <br>
 * [文件描述]<br>
 * 部门表 pojo bean<br>
 * <br>
 * [修改记录]<br>
 * 2017-01-04 11:08:07 创建<br>
 * @version 1.00
 */
public class Department implements Serializable{
    /**
	 * 序列化UID
	 */
	private static final long serialVersionUID = 1L;

	/**
	 *主键、自动增长
	 */
	private Long id;
	/**
	 *部门编号，和商户编码挂钩，
	 *用于部门数据权限控制
	 */
	private String departmentCode;
	/**
	 *权限编码
	 */
	private String permissionCode;
	/**
	 *上级部门ID，如果为-1则为顶级部门
	 */
	private Long parentId;
	/**
	 *部门名称
	 */
	private String departmentName;
	/**
	 * 部门层级
	 */
	private Integer layer;
	/**
	 *排序编号，用于排序
	 */
	private String sort;
	/**
	 *备注
	 */
	private String remark;
	/**
	 *商户ID
	 */
	private Long merchantId;
	/**
	 *创建人ID,关联用户表
	 */
	private Long createUserId;
	/**
	 *创建时间格式：yyyy-MM-dd HH:mm:ss
	 */
	@JSONField (format="yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	/**
	 *修改人ID,关联用户表
	 */
	private Long updateUserId;
	/**
	 *修改时间格式：yyyy-MM-dd HH:mm:ss
	 */
	@JSONField (format="yyyy-MM-dd HH:mm:ss")
	private Date updateTime;
	/**
	 *是否删除:[{key:del_flag,values:[{no:0,alias:UNDEL,remark:否},{no:1,alias:DEL,remark:是}]}]
	 */
	private String delFlag;
	/**
	 *错误信息 （导入用）
	 */
	private String failure;
	/**
	 * 结佣方式
	 * 1、签约结佣 2、按揭结佣
	 */
	private String commissionWay;
	/**
	 * 机构佣金
	 */
	private String commission;
	/**
	 * 带看奖励
	 */
	private String reward;
	/**
	 * 使用楼盘佣金
	 * 0: 否 1: 是
	 */
	private String premisesCommission;
	/**
	 *
	 * 对接人
	 */
	private Long principal;

	/**
	 * 区域名称
	 * @return
	 */
	private String areaName;
	
	/**
	 * 下级部门
	 */
	private List<Department> subDepartment;
	
	private String weappQrcode;

	public Long getPrincipal() {
		return principal;
	}

	public void setPrincipal(Long principal) {
		this.principal = principal;
	}

	public String getAreaName() {
		return areaName;
	}

	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}

	public void setDepartmentCode(String departmentCode) {
		this.departmentCode = departmentCode;
	}

	public String getDepartmentCode() {
		return this.departmentCode;
	}

	public void setPermissionCode(String permissionCode) {
		this.permissionCode = permissionCode;
	}

	public String getPermissionCode() {
		return this.permissionCode;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public Long getParentId() {
		return this.parentId;
	}

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	public String getDepartmentName() {
		return this.departmentName;
	}

	public Integer getLayer() {
		return layer;
	}

	public void setLayer(Integer layer) {
		this.layer = layer;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public String getSort() {
		return this.sort;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setMerchantId(Long merchantId) {
		this.merchantId = merchantId;
	}

	public Long getMerchantId() {
		return this.merchantId;
	}

	public void setCreateUserId(Long createUserId) {
		this.createUserId = createUserId;
	}

	public Long getCreateUserId() {
		return this.createUserId;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setUpdateUserId(Long updateUserId) {
		this.updateUserId = updateUserId;
	}

	public Long getUpdateUserId() {
		return this.updateUserId;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public String getDelFlag() {
		return this.delFlag;
	}

	public String getFailure() {
		return failure;
	}

	public void setFailure(String failure) {
		this.failure = failure;
	}

	public String getCommissionWay() {
		return commissionWay;
	}

	public void setCommissionWay(String commissionWay) {
		this.commissionWay = commissionWay;
	}

	public String getCommission() {
		return commission;
	}

	public void setCommission(String commission) {
		this.commission = commission;
	}

	public String getReward() {
		return reward;
	}

	public void setReward(String reward) {
		this.reward = reward;
	}

	public String getPremisesCommission() {
		return premisesCommission;
	}

	public void setPremisesCommission(String premisesCommission) {
		this.premisesCommission = premisesCommission;
	}

	public List<Department> getSubDepartment() {
		return subDepartment;
	}

	public void setSubDepartment(List<Department> subDepartment) {
		this.subDepartment = subDepartment;
	}

	public String getWeappQrcode() {
		return weappQrcode;
	}

	public void setWeappQrcode(String weappQrcode) {
		this.weappQrcode = weappQrcode;
	}
	
}
